// UPSTreeView.h : interface of the CUPSTreeView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CUPSTREEVIEW_H__10C3B6CB_3712_467F_AA92_197A43C0BC97__INCLUDED_)
#define AFX_CUPSTREEVIEW_H__10C3B6CB_3712_467F_AA92_197A43C0BC97__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CUPSTreeView : public CTreeView
{
protected: // create from serialization only
	CUPSTreeView();
	DECLARE_DYNCREATE(CUPSTreeView)

// Attributes
public:
	CUPSMonitorDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUPSTreeView)
	public:
	virtual BOOL DestroyWindow();
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	//}}AFX_VIRTUAL

// Implementation
public:
	int  GetRandInt(int MIN, int MAX);
	int  fireAlertMsg();
	void DelChild( HTREEITEM hItem );
	void ExpandAllTreeNodes(CTreeCtrl *pTree, HTREEITEM hRoot, BOOL bExpand);
	void updateTreeList();
	virtual ~CUPSTreeView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	HTREEITEM hRootNormal;
	HTREEITEM hRootStopped;
	HTREEITEM hRootAbnormal;
	HTREEITEM hRootLost;
	HTREEITEM hRootPowFail;
	CImageList m_ImageList;
	//void AddBranch(HTREEITEM hTreeItem, CList<CDeviceNodes*,CDeviceNodes*> *pList);
	//HTREEITEM AddLeaf(HTREEITEM hTreeItem, CDeviceNodes *pInfo);
	//HTREEITEM FindTreeItem(HTREEITEM hTreeItem, long nObjectID);
// Generated message map functions
protected:
	afx_msg void OnAlertMessage(WPARAM wParam, LPARAM lParam);
	//{{AFX_MSG(CUPSTreeView)
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in UPSTreeView.cpp
inline CUPSMonitorDoc* CUPSTreeView::GetDocument()
   { return (CUPSMonitorDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CUPSTREEVIEW_H__10C3B6CB_3712_467F_AA92_197A43C0BC97__INCLUDED_)
